<form id="typeInfoForm" xmlns:th="http://www.w3.org/1999/xhtml">
    <input name="id" type="hidden" th:value="${typeInfo?.id}">
    <input id="d-fid" name="fid" type="hidden" th:value="${typeInfo?.fid == null ? 0 : typeInfo?.fid}">
    <div class="form-group row">
        <label for="d-pname" class="col-sm-2 col-form-label">上级分类:</label>
        <div class="col-sm-10">
            <input type="text" onclick="showTypes(2)" th:value="${typeInfo?.parent==null?'无':typeInfo?.parent?.name}"
                   class="form-control" id="d-pname" placeholder="选择上级分类" readonly>
        </div>
    </div>
    <div class="form-group row">
        <label for="typeName" class="col-sm-2 col-form-label">分类名称</label>
        <div class="col-sm-10">
            <input type="text" th:value="${typeInfo?.typeName}" name="typeName" class="form-control" id="typeName"
                   placeholder="填写分类名称" required>
        </div>
        <div class="invalid-feedback">请填写分类名称</div>
    </div>
    <div class="form-group row">
        <label for="typeDesc" class="col-sm-2 col-form-label">分类描述</label>
        <div class="col-sm-10">
            <input type="text" th:value="${typeInfo?.typeDesc}" name="typeDesc" class="form-control"
                   id="typeDesc"
                   placeholder="填写分类描述" required>
            <div class="invalid-feedback">请填写分类描述</div>
        </div>
    </div>
    <div class="form-group row">
        <label for="sort" class="col-sm-2 col-form-label">分类排序</label>
        <div class="col-sm-10">
            <input type="text" th:value="${typeInfo?.sort}" name="sort" class="form-control" id="sort"
                   placeholder="分类排序" required>
            <div class="invalid-feedback"></div>
        </div>
    </div>
</form>